using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWZKOPF
    {
        public DataRow Convert2WZKOPF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryWZKOPF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["WZKMANDANT"] = " ".PadRight(2 ); 
         dwReturn["WZKREGEL"] = " ".PadRight(8 ); 
         dwReturn["WZKAENZL"] = " ".PadRight(0 ); 
         dwReturn["WZKAENB"] = " ".PadRight(8 ); 
         dwReturn["WZKAEND"] = " ".PadRight(0 ); 
         dwReturn["WZKNEUB"] = " ".PadRight(8 ); 
         dwReturn["WZKNEUD"] = " ".PadRight(0 ); 
         dwReturn["WZKKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["WZKLAND"] = " ".PadRight(3 ); 
         dwReturn["WZKABNGRP"] = " ".PadRight(3 ); 
         dwReturn["WZKPRGR"] = " ".PadRight(3 ); 
         dwReturn["WZKARTGRP"] = " ".PadRight(3 ); 
         dwReturn["WZKWAKZ"] = " ".PadRight(1 ); 
         dwReturn["WZKKOLL"] = " ".PadRight(5 ); 
         dwReturn["WZKART"] = " ".PadRight(24 ); 
         dwReturn["WZKFARBE"] = " ".PadRight(10 ); 
         dwReturn["WZKDESSKZ"] = " ".PadRight(1 ); 
         dwReturn["WZKWULAE"] = " ".PadRight(0 ); 
         dwReturn["WZKWULAEV"] = " ".PadRight(0 ); 
         dwReturn["WZKWULAEB"] = " ".PadRight(0 ); 
         dwReturn["WZKAUFMSL"] = " ".PadRight(2 ); 
         dwReturn["WZKWSCHTXT"] = " ".PadRight(3 ); 
         dwReturn["WZKZUSAM"] = " ".PadRight(2 ); 
         dwReturn["WZKVERPART"] = " ".PadRight(3 ); 
         dwReturn["WZKMAART"] = " ".PadRight(1 ); 
         dwReturn["WZKMAFZST"] = " ".PadRight(0 ); 
         dwReturn["WZKERSART"] = " ".PadRight(1 ); 
         dwReturn["WZKUBLI"] = " ".PadRight(1 ); 
         dwReturn["WZKZUTART"] = " ".PadRight(1 ); 
         dwReturn["WZKLO"] = " ".PadRight(2 ); 
         dwReturn["WZKLB"] = " ".PadRight(2 ); 
         dwReturn["WZKZSBER"] = " ".PadRight(1 ); 
         dwReturn["WZKZSTEIL"] = " ".PadRight(1 ); 
         dwReturn["WZKFA"] = " ".PadRight(0 ); 
         dwReturn["WZKGA"] = " ".PadRight(0 ); 
         dwReturn["WZKQA"] = " ".PadRight(0 ); 
         dwReturn["WZKPOSTYP"] = " ".PadRight(3 ); 
         dwReturn["WZKPTFA"] = " ".PadRight(0 ); 
         dwReturn["WZKPTGA"] = " ".PadRight(0 ); 
         dwReturn["WZKPTQA"] = " ".PadRight(0 ); 
         dwReturn["WZKBASISRE"] = " ".PadRight(8 ); 
         dwReturn["WZKLAEBIS1"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR1"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND1"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ1"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE1"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS1"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM1"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND1"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ1"] = " ".PadRight(1 ); 
         dwReturn["WZKLAEBIS2"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR2"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND2"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ2"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE2"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS2"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM2"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND2"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ2"] = " ".PadRight(1 ); 
         dwReturn["WZKLAEBIS3"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR3"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND3"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ3"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE3"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS3"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM3"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND3"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ3"] = " ".PadRight(1 ); 
         dwReturn["WZKLAEBIS4"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR4"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND4"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ4"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE4"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS4"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM4"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND4"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ4"] = " ".PadRight(1 ); 
         dwReturn["WZKLAEBIS5"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR5"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND5"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ5"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE5"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS5"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM5"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND5"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ5"] = " ".PadRight(1 ); 
         dwReturn["WZKLAEBIS6"] = " ".PadRight(0 ); 
         dwReturn["WZKPROMTR6"] = " ".PadRight(0 ); 
         dwReturn["WZKLAERUND6"] = " ".PadRight(1 ); 
         dwReturn["WZKLAESPEZ6"] = " ".PadRight(1 ); 
         dwReturn["WZKSTDLAE6"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTBIS6"] = " ".PadRight(0 ); 
         dwReturn["WZKPROCM6"] = " ".PadRight(0 ); 
         dwReturn["WZKBRTRUND6"] = " ".PadRight(1 ); 
         dwReturn["WZKBRTSPEZ6"] = " ".PadRight(1 ); 
         dwReturn["WZKWZ03AUS"] = " ".PadRight(1 ); 
         dwReturn["WZKAUFBWZ04"] = " ".PadRight(2 ); 
         dwReturn["WZKAUFBWZ31"] = " ".PadRight(2 ); 
         dwReturn["WZKSTORNO"] = " ".PadRight(1 ); 
         dwReturn["WZKZUGET"] = " ".PadRight(1 ); 
         dwReturn["WZKKZSTDLAE"] = " ".PadRight(1 ); 
         dwReturn["WZKTEILLAE"] = " ".PadRight(0 ); 
         dwReturn["WZKNACHLAE"] = " ".PadRight(0 ); 
         dwReturn["WZKWOS"] = " ".PadRight(1 ); 
         dwReturn["WZKQPKTH"] = " ".PadRight(0 ); 
         dwReturn["WZKQPKTLH"] = " ".PadRight(0 ); 
         dwReturn["WZKEINWERK"] = " ".PadRight(1 ); 
         dwReturn["WZKPRFBEG"] = " ".PadRight(1 ); 
         dwReturn["WZKGENEHM"] = " ".PadRight(1 ); 
         dwReturn["WZKVTLNR"] = " ".PadRight(4 ); 
         dwReturn["WZKLBPRU"] = " ".PadRight(1 ); 
         dwReturn["WZKHUELTYP"] = " ".PadRight(6 ); 
         dwReturn["WZKSPULGEW"] = " ".PadRight(0 ); 
         dwReturn["WZKSPULGEV"] = " ".PadRight(0 ); 
         dwReturn["WZKSPULGEB"] = " ".PadRight(0 ); 
         dwReturn["WZKFDRES"] = " ".PadRight(1 ); 
         dwReturn["WZKKF"] = " ".PadRight(1 ); 
         dwReturn["WZKWICKL"] = " ".PadRight(1 ); 
         dwReturn["WZKFILLER"] = " ".PadRight(94 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapWZKOPF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWZKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWZKOPF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWZKOPF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertWZKOPF(dwLocal, ITXDBVERSION);
            }
            UpdateWZKOPF(dwLocal);
        }
        public void InsertWZKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO WZKOPF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryWZKOPF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WZKOPF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM WZKOPF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WZKOPF";
            Return = Result;
            return Return;
        }
        public void DeleteWZKOPF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM WZKOPF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateWZKOPF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE WZKOPF SET "
                    +"WZKMANDANT= :WZKMANDANT,"
                    +"WZKREGEL= :WZKREGEL,"
                    +"WZKAENZL= :WZKAENZL,"
                    +"WZKAENB= :WZKAENB,"
                    +"WZKAEND= :WZKAEND,"
                    +"WZKNEUB= :WZKNEUB,"
                    +"WZKNEUD= :WZKNEUD,"
                    +"WZKKUNDNR= :WZKKUNDNR,"
                    +"WZKLAND= :WZKLAND,"
                    +"WZKABNGRP= :WZKABNGRP,"
                    +"WZKPRGR= :WZKPRGR,"
                    +"WZKARTGRP= :WZKARTGRP,"
                    +"WZKWAKZ= :WZKWAKZ,"
                    +"WZKKOLL= :WZKKOLL,"
                    +"WZKART= :WZKART,"
                    +"WZKFARBE= :WZKFARBE,"
                    +"WZKDESSKZ= :WZKDESSKZ,"
                    +"WZKWULAE= :WZKWULAE,"
                    +"WZKWULAEV= :WZKWULAEV,"
                    +"WZKWULAEB= :WZKWULAEB,"
                    +"WZKAUFMSL= :WZKAUFMSL,"
                    +"WZKWSCHTXT= :WZKWSCHTXT,"
                    +"WZKZUSAM= :WZKZUSAM,"
                    +"WZKVERPART= :WZKVERPART,"
                    +"WZKMAART= :WZKMAART,"
                    +"WZKMAFZST= :WZKMAFZST,"
                    +"WZKERSART= :WZKERSART,"
                    +"WZKUBLI= :WZKUBLI,"
                    +"WZKZUTART= :WZKZUTART,"
                    +"WZKLO= :WZKLO,"
                    +"WZKLB= :WZKLB,"
                    +"WZKZSBER= :WZKZSBER,"
                    +"WZKZSTEIL= :WZKZSTEIL,"
                    +"WZKFA= :WZKFA,"
                    +"WZKGA= :WZKGA,"
                    +"WZKQA= :WZKQA,"
                    +"WZKPOSTYP= :WZKPOSTYP,"
                    +"WZKPTFA= :WZKPTFA,"
                    +"WZKPTGA= :WZKPTGA,"
                    +"WZKPTQA= :WZKPTQA,"
                    +"WZKBASISRE= :WZKBASISRE,"
                    +"WZKLAEBIS1= :WZKLAEBIS1,"
                    +"WZKPROMTR1= :WZKPROMTR1,"
                    +"WZKLAERUND1= :WZKLAERUND1,"
                    +"WZKLAESPEZ1= :WZKLAESPEZ1,"
                    +"WZKSTDLAE1= :WZKSTDLAE1,"
                    +"WZKBRTBIS1= :WZKBRTBIS1,"
                    +"WZKPROCM1= :WZKPROCM1,"
                    +"WZKBRTRUND1= :WZKBRTRUND1,"
                    +"WZKBRTSPEZ1= :WZKBRTSPEZ1,"
                    +"WZKLAEBIS2= :WZKLAEBIS2,"
                    +"WZKPROMTR2= :WZKPROMTR2,"
                    +"WZKLAERUND2= :WZKLAERUND2,"
                    +"WZKLAESPEZ2= :WZKLAESPEZ2,"
                    +"WZKSTDLAE2= :WZKSTDLAE2,"
                    +"WZKBRTBIS2= :WZKBRTBIS2,"
                    +"WZKPROCM2= :WZKPROCM2,"
                    +"WZKBRTRUND2= :WZKBRTRUND2,"
                    +"WZKBRTSPEZ2= :WZKBRTSPEZ2,"
                    +"WZKLAEBIS3= :WZKLAEBIS3,"
                    +"WZKPROMTR3= :WZKPROMTR3,"
                    +"WZKLAERUND3= :WZKLAERUND3,"
                    +"WZKLAESPEZ3= :WZKLAESPEZ3,"
                    +"WZKSTDLAE3= :WZKSTDLAE3,"
                    +"WZKBRTBIS3= :WZKBRTBIS3,"
                    +"WZKPROCM3= :WZKPROCM3,"
                    +"WZKBRTRUND3= :WZKBRTRUND3,"
                    +"WZKBRTSPEZ3= :WZKBRTSPEZ3,"
                    +"WZKLAEBIS4= :WZKLAEBIS4,"
                    +"WZKPROMTR4= :WZKPROMTR4,"
                    +"WZKLAERUND4= :WZKLAERUND4,"
                    +"WZKLAESPEZ4= :WZKLAESPEZ4,"
                    +"WZKSTDLAE4= :WZKSTDLAE4,"
                    +"WZKBRTBIS4= :WZKBRTBIS4,"
                    +"WZKPROCM4= :WZKPROCM4,"
                    +"WZKBRTRUND4= :WZKBRTRUND4,"
                    +"WZKBRTSPEZ4= :WZKBRTSPEZ4,"
                    +"WZKLAEBIS5= :WZKLAEBIS5,"
                    +"WZKPROMTR5= :WZKPROMTR5,"
                    +"WZKLAERUND5= :WZKLAERUND5,"
                    +"WZKLAESPEZ5= :WZKLAESPEZ5,"
                    +"WZKSTDLAE5= :WZKSTDLAE5,"
                    +"WZKBRTBIS5= :WZKBRTBIS5,"
                    +"WZKPROCM5= :WZKPROCM5,"
                    +"WZKBRTRUND5= :WZKBRTRUND5,"
                    +"WZKBRTSPEZ5= :WZKBRTSPEZ5,"
                    +"WZKLAEBIS6= :WZKLAEBIS6,"
                    +"WZKPROMTR6= :WZKPROMTR6,"
                    +"WZKLAERUND6= :WZKLAERUND6,"
                    +"WZKLAESPEZ6= :WZKLAESPEZ6,"
                    +"WZKSTDLAE6= :WZKSTDLAE6,"
                    +"WZKBRTBIS6= :WZKBRTBIS6,"
                    +"WZKPROCM6= :WZKPROCM6,"
                    +"WZKBRTRUND6= :WZKBRTRUND6,"
                    +"WZKBRTSPEZ6= :WZKBRTSPEZ6,"
                    +"WZKWZ03AUS= :WZKWZ03AUS,"
                    +"WZKAUFBWZ04= :WZKAUFBWZ04,"
                    +"WZKAUFBWZ31= :WZKAUFBWZ31,"
                    +"WZKSTORNO= :WZKSTORNO,"
                    +"WZKZUGET= :WZKZUGET,"
                    +"WZKKZSTDLAE= :WZKKZSTDLAE,"
                    +"WZKTEILLAE= :WZKTEILLAE,"
                    +"WZKNACHLAE= :WZKNACHLAE,"
                    +"WZKWOS= :WZKWOS,"
                    +"WZKQPKTH= :WZKQPKTH,"
                    +"WZKQPKTLH= :WZKQPKTLH,"
                    +"WZKEINWERK= :WZKEINWERK,"
                    +"WZKPRFBEG= :WZKPRFBEG,"
                    +"WZKGENEHM= :WZKGENEHM,"
                    +"WZKVTLNR= :WZKVTLNR,"
                    +"WZKLBPRU= :WZKLBPRU,"
                    +"WZKHUELTYP= :WZKHUELTYP,"
                    +"WZKSPULGEW= :WZKSPULGEW,"
                    +"WZKSPULGEV= :WZKSPULGEV,"
                    +"WZKSPULGEB= :WZKSPULGEB,"
                    +"WZKFDRES= :WZKFDRES,"
                    +"WZKKF= :WZKKF,"
                    +"WZKWICKL= :WZKWICKL,"
                    +"WZKFILLER= :WZKFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("WZKMANDANT", OracleType.NVarChar).Value = dwData["WZKMANDANT"].ToString(); 
          or1.Parameters.Add("WZKREGEL", OracleType.NVarChar).Value = dwData["WZKREGEL"].ToString(); 
          or1.Parameters.Add("WZKAENZL", OracleType.NVarChar).Value = dwData["WZKAENZL"].ToString(); 
          or1.Parameters.Add("WZKAENB", OracleType.NVarChar).Value = dwData["WZKAENB"].ToString(); 
          or1.Parameters.Add("WZKAEND", OracleType.NVarChar).Value = dwData["WZKAEND"].ToString(); 
          or1.Parameters.Add("WZKNEUB", OracleType.NVarChar).Value = dwData["WZKNEUB"].ToString(); 
          or1.Parameters.Add("WZKNEUD", OracleType.NVarChar).Value = dwData["WZKNEUD"].ToString(); 
          or1.Parameters.Add("WZKKUNDNR", OracleType.NVarChar).Value = dwData["WZKKUNDNR"].ToString(); 
          or1.Parameters.Add("WZKLAND", OracleType.NVarChar).Value = dwData["WZKLAND"].ToString(); 
          or1.Parameters.Add("WZKABNGRP", OracleType.NVarChar).Value = dwData["WZKABNGRP"].ToString(); 
          or1.Parameters.Add("WZKPRGR", OracleType.NVarChar).Value = dwData["WZKPRGR"].ToString(); 
          or1.Parameters.Add("WZKARTGRP", OracleType.NVarChar).Value = dwData["WZKARTGRP"].ToString(); 
          or1.Parameters.Add("WZKWAKZ", OracleType.NVarChar).Value = dwData["WZKWAKZ"].ToString(); 
          or1.Parameters.Add("WZKKOLL", OracleType.NVarChar).Value = dwData["WZKKOLL"].ToString(); 
          or1.Parameters.Add("WZKART", OracleType.NVarChar).Value = dwData["WZKART"].ToString(); 
          or1.Parameters.Add("WZKFARBE", OracleType.NVarChar).Value = dwData["WZKFARBE"].ToString(); 
          or1.Parameters.Add("WZKDESSKZ", OracleType.NVarChar).Value = dwData["WZKDESSKZ"].ToString(); 
          or1.Parameters.Add("WZKWULAE", OracleType.NVarChar).Value = dwData["WZKWULAE"].ToString(); 
          or1.Parameters.Add("WZKWULAEV", OracleType.NVarChar).Value = dwData["WZKWULAEV"].ToString(); 
          or1.Parameters.Add("WZKWULAEB", OracleType.NVarChar).Value = dwData["WZKWULAEB"].ToString(); 
          or1.Parameters.Add("WZKAUFMSL", OracleType.NVarChar).Value = dwData["WZKAUFMSL"].ToString(); 
          or1.Parameters.Add("WZKWSCHTXT", OracleType.NVarChar).Value = dwData["WZKWSCHTXT"].ToString(); 
          or1.Parameters.Add("WZKZUSAM", OracleType.NVarChar).Value = dwData["WZKZUSAM"].ToString(); 
          or1.Parameters.Add("WZKVERPART", OracleType.NVarChar).Value = dwData["WZKVERPART"].ToString(); 
          or1.Parameters.Add("WZKMAART", OracleType.NVarChar).Value = dwData["WZKMAART"].ToString(); 
          or1.Parameters.Add("WZKMAFZST", OracleType.NVarChar).Value = dwData["WZKMAFZST"].ToString(); 
          or1.Parameters.Add("WZKERSART", OracleType.NVarChar).Value = dwData["WZKERSART"].ToString(); 
          or1.Parameters.Add("WZKUBLI", OracleType.NVarChar).Value = dwData["WZKUBLI"].ToString(); 
          or1.Parameters.Add("WZKZUTART", OracleType.NVarChar).Value = dwData["WZKZUTART"].ToString(); 
          or1.Parameters.Add("WZKLO", OracleType.NVarChar).Value = dwData["WZKLO"].ToString(); 
          or1.Parameters.Add("WZKLB", OracleType.NVarChar).Value = dwData["WZKLB"].ToString(); 
          or1.Parameters.Add("WZKZSBER", OracleType.NVarChar).Value = dwData["WZKZSBER"].ToString(); 
          or1.Parameters.Add("WZKZSTEIL", OracleType.NVarChar).Value = dwData["WZKZSTEIL"].ToString(); 
          or1.Parameters.Add("WZKFA", OracleType.NVarChar).Value = dwData["WZKFA"].ToString(); 
          or1.Parameters.Add("WZKGA", OracleType.NVarChar).Value = dwData["WZKGA"].ToString(); 
          or1.Parameters.Add("WZKQA", OracleType.NVarChar).Value = dwData["WZKQA"].ToString(); 
          or1.Parameters.Add("WZKPOSTYP", OracleType.NVarChar).Value = dwData["WZKPOSTYP"].ToString(); 
          or1.Parameters.Add("WZKPTFA", OracleType.NVarChar).Value = dwData["WZKPTFA"].ToString(); 
          or1.Parameters.Add("WZKPTGA", OracleType.NVarChar).Value = dwData["WZKPTGA"].ToString(); 
          or1.Parameters.Add("WZKPTQA", OracleType.NVarChar).Value = dwData["WZKPTQA"].ToString(); 
          or1.Parameters.Add("WZKBASISRE", OracleType.NVarChar).Value = dwData["WZKBASISRE"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS1", OracleType.NVarChar).Value = dwData["WZKLAEBIS1"].ToString(); 
          or1.Parameters.Add("WZKPROMTR1", OracleType.NVarChar).Value = dwData["WZKPROMTR1"].ToString(); 
          or1.Parameters.Add("WZKLAERUND1", OracleType.NVarChar).Value = dwData["WZKLAERUND1"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ1", OracleType.NVarChar).Value = dwData["WZKLAESPEZ1"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE1", OracleType.NVarChar).Value = dwData["WZKSTDLAE1"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS1", OracleType.NVarChar).Value = dwData["WZKBRTBIS1"].ToString(); 
          or1.Parameters.Add("WZKPROCM1", OracleType.NVarChar).Value = dwData["WZKPROCM1"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND1", OracleType.NVarChar).Value = dwData["WZKBRTRUND1"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ1", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ1"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS2", OracleType.NVarChar).Value = dwData["WZKLAEBIS2"].ToString(); 
          or1.Parameters.Add("WZKPROMTR2", OracleType.NVarChar).Value = dwData["WZKPROMTR2"].ToString(); 
          or1.Parameters.Add("WZKLAERUND2", OracleType.NVarChar).Value = dwData["WZKLAERUND2"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ2", OracleType.NVarChar).Value = dwData["WZKLAESPEZ2"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE2", OracleType.NVarChar).Value = dwData["WZKSTDLAE2"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS2", OracleType.NVarChar).Value = dwData["WZKBRTBIS2"].ToString(); 
          or1.Parameters.Add("WZKPROCM2", OracleType.NVarChar).Value = dwData["WZKPROCM2"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND2", OracleType.NVarChar).Value = dwData["WZKBRTRUND2"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ2", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ2"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS3", OracleType.NVarChar).Value = dwData["WZKLAEBIS3"].ToString(); 
          or1.Parameters.Add("WZKPROMTR3", OracleType.NVarChar).Value = dwData["WZKPROMTR3"].ToString(); 
          or1.Parameters.Add("WZKLAERUND3", OracleType.NVarChar).Value = dwData["WZKLAERUND3"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ3", OracleType.NVarChar).Value = dwData["WZKLAESPEZ3"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE3", OracleType.NVarChar).Value = dwData["WZKSTDLAE3"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS3", OracleType.NVarChar).Value = dwData["WZKBRTBIS3"].ToString(); 
          or1.Parameters.Add("WZKPROCM3", OracleType.NVarChar).Value = dwData["WZKPROCM3"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND3", OracleType.NVarChar).Value = dwData["WZKBRTRUND3"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ3", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ3"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS4", OracleType.NVarChar).Value = dwData["WZKLAEBIS4"].ToString(); 
          or1.Parameters.Add("WZKPROMTR4", OracleType.NVarChar).Value = dwData["WZKPROMTR4"].ToString(); 
          or1.Parameters.Add("WZKLAERUND4", OracleType.NVarChar).Value = dwData["WZKLAERUND4"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ4", OracleType.NVarChar).Value = dwData["WZKLAESPEZ4"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE4", OracleType.NVarChar).Value = dwData["WZKSTDLAE4"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS4", OracleType.NVarChar).Value = dwData["WZKBRTBIS4"].ToString(); 
          or1.Parameters.Add("WZKPROCM4", OracleType.NVarChar).Value = dwData["WZKPROCM4"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND4", OracleType.NVarChar).Value = dwData["WZKBRTRUND4"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ4", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ4"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS5", OracleType.NVarChar).Value = dwData["WZKLAEBIS5"].ToString(); 
          or1.Parameters.Add("WZKPROMTR5", OracleType.NVarChar).Value = dwData["WZKPROMTR5"].ToString(); 
          or1.Parameters.Add("WZKLAERUND5", OracleType.NVarChar).Value = dwData["WZKLAERUND5"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ5", OracleType.NVarChar).Value = dwData["WZKLAESPEZ5"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE5", OracleType.NVarChar).Value = dwData["WZKSTDLAE5"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS5", OracleType.NVarChar).Value = dwData["WZKBRTBIS5"].ToString(); 
          or1.Parameters.Add("WZKPROCM5", OracleType.NVarChar).Value = dwData["WZKPROCM5"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND5", OracleType.NVarChar).Value = dwData["WZKBRTRUND5"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ5", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ5"].ToString(); 
          or1.Parameters.Add("WZKLAEBIS6", OracleType.NVarChar).Value = dwData["WZKLAEBIS6"].ToString(); 
          or1.Parameters.Add("WZKPROMTR6", OracleType.NVarChar).Value = dwData["WZKPROMTR6"].ToString(); 
          or1.Parameters.Add("WZKLAERUND6", OracleType.NVarChar).Value = dwData["WZKLAERUND6"].ToString(); 
          or1.Parameters.Add("WZKLAESPEZ6", OracleType.NVarChar).Value = dwData["WZKLAESPEZ6"].ToString(); 
          or1.Parameters.Add("WZKSTDLAE6", OracleType.NVarChar).Value = dwData["WZKSTDLAE6"].ToString(); 
          or1.Parameters.Add("WZKBRTBIS6", OracleType.NVarChar).Value = dwData["WZKBRTBIS6"].ToString(); 
          or1.Parameters.Add("WZKPROCM6", OracleType.NVarChar).Value = dwData["WZKPROCM6"].ToString(); 
          or1.Parameters.Add("WZKBRTRUND6", OracleType.NVarChar).Value = dwData["WZKBRTRUND6"].ToString(); 
          or1.Parameters.Add("WZKBRTSPEZ6", OracleType.NVarChar).Value = dwData["WZKBRTSPEZ6"].ToString(); 
          or1.Parameters.Add("WZKWZ03AUS", OracleType.NVarChar).Value = dwData["WZKWZ03AUS"].ToString(); 
          or1.Parameters.Add("WZKAUFBWZ04", OracleType.NVarChar).Value = dwData["WZKAUFBWZ04"].ToString(); 
          or1.Parameters.Add("WZKAUFBWZ31", OracleType.NVarChar).Value = dwData["WZKAUFBWZ31"].ToString(); 
          or1.Parameters.Add("WZKSTORNO", OracleType.NVarChar).Value = dwData["WZKSTORNO"].ToString(); 
          or1.Parameters.Add("WZKZUGET", OracleType.NVarChar).Value = dwData["WZKZUGET"].ToString(); 
          or1.Parameters.Add("WZKKZSTDLAE", OracleType.NVarChar).Value = dwData["WZKKZSTDLAE"].ToString(); 
          or1.Parameters.Add("WZKTEILLAE", OracleType.NVarChar).Value = dwData["WZKTEILLAE"].ToString(); 
          or1.Parameters.Add("WZKNACHLAE", OracleType.NVarChar).Value = dwData["WZKNACHLAE"].ToString(); 
          or1.Parameters.Add("WZKWOS", OracleType.NVarChar).Value = dwData["WZKWOS"].ToString(); 
          or1.Parameters.Add("WZKQPKTH", OracleType.NVarChar).Value = dwData["WZKQPKTH"].ToString(); 
          or1.Parameters.Add("WZKQPKTLH", OracleType.NVarChar).Value = dwData["WZKQPKTLH"].ToString(); 
          or1.Parameters.Add("WZKEINWERK", OracleType.NVarChar).Value = dwData["WZKEINWERK"].ToString(); 
          or1.Parameters.Add("WZKPRFBEG", OracleType.NVarChar).Value = dwData["WZKPRFBEG"].ToString(); 
          or1.Parameters.Add("WZKGENEHM", OracleType.NVarChar).Value = dwData["WZKGENEHM"].ToString(); 
          or1.Parameters.Add("WZKVTLNR", OracleType.NVarChar).Value = dwData["WZKVTLNR"].ToString(); 
          or1.Parameters.Add("WZKLBPRU", OracleType.NVarChar).Value = dwData["WZKLBPRU"].ToString(); 
          or1.Parameters.Add("WZKHUELTYP", OracleType.NVarChar).Value = dwData["WZKHUELTYP"].ToString(); 
          or1.Parameters.Add("WZKSPULGEW", OracleType.NVarChar).Value = dwData["WZKSPULGEW"].ToString(); 
          or1.Parameters.Add("WZKSPULGEV", OracleType.NVarChar).Value = dwData["WZKSPULGEV"].ToString(); 
          or1.Parameters.Add("WZKSPULGEB", OracleType.NVarChar).Value = dwData["WZKSPULGEB"].ToString(); 
          or1.Parameters.Add("WZKFDRES", OracleType.NVarChar).Value = dwData["WZKFDRES"].ToString(); 
          or1.Parameters.Add("WZKKF", OracleType.NVarChar).Value = dwData["WZKKF"].ToString(); 
          or1.Parameters.Add("WZKWICKL", OracleType.NVarChar).Value = dwData["WZKWICKL"].ToString(); 
          or1.Parameters.Add("WZKFILLER", OracleType.NVarChar).Value = dwData["WZKFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
